<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>收益情况</title>
    <link rel="stylesheet" href="../layui-v2.6.8/layui/css/layui.css">
    <link rel="stylesheet" href="../css/profit.css">
    <link rel="shortcut icon" href="../img/hair.png">
    <script src="../js/profit.js"></script>
    <script src="../js/echarts.min.js"></script>
    <script src="../js/vintage.js"></script>
    <script src="../js/shine.js"></script>
    <script src="http://static.runoob.com/assets/vue/1.0.11/vue.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.0/axios.min.js"></script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">W·M</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                <a href="javascript:;">
                    <img src="../img/geren.png" class="layui-nav-img">
                    <span id="usernamep"></span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="Personal_Information.html">个人信息</a></dd>
                    <dd><a href="" onclick="logout()">退出登录</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-more-vertical"></i>
                </a>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="layui-nav-item" href="MembershipManagement.html">会员管理</a>
                </li>
                <li class="layui-nav-item">
                    <a href="investMoney.html">充值与查询</a>
                </li>
                <li class="layui-nav-item">
                    <a href="addMembership.html">办理会员卡</a>
                </li>
                <li class="layui-nav-item">
                    <a href="operation.html">会员操作记录</a>
                </li>
                <li class="layui-nav-item"><a href="profit.html">收益情况</a></li>
                <li class="layui-nav-item"><a href="Personal_Information.html">个人信息</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;font:bold 1.1em 新宋体;">
            <h2>普通用户消费录入</h2>
            <hr/>
            <div id="todaymoney"><label>今日收益统计(元)<input type="text" id="getmoney" name="getmoney" placeholder="输入普通用户盈收"
                                                        onkeyup="this.value=this.value.replace(/\D/g,'')"
                                                        maxlength="10"></label>
                <button type="button" class="layui-btn layui-btn-normal" id="sub" onclick="profitin()">录入</button>

            </div>
            <hr/>
            <h2 style="margin-top: 1em;">总体营收情况统计</h2>
            <hr/>
            <div id="selectTime">
                <div class="layui-form">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label"
                                   style="font:bold 1.1em 新宋体; text-align: center;">日期范围</label>
                            <div class="layui-inline">
                                <div class="layui-input-inline" id="test6">
                                    <input type="text" autocomplete="off" name="startDate" id="test-startDate-1"
                                            class="layui-input" placeholder="开始日期">
                                </div>
                                <div class="layui-form-mid">-</div>
                                <div class="layui-input-inline" id="test7">
                                    <input type="text" autocomplete="off" name="endDate" id="test-endDate-1"
                                           class="layui-input" disabled placeholder="结束日期">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div id="main"></div>
            <hr/>
            <div id="main1"></div>
        </div>
    </div>

    <div class="layui-footer" style="text-align:center;">
        W·M
    </div>
</div>
<script src="../layui-v2.6.8/layui/layui.js"></script>
<script>
    //JS
    layui.use(['element', 'layer', 'util'], function () {
        var element = layui.element
            , layer = layui.layer
            , util = layui.util
            , $ = layui.$;

        //头部事件
        util.event('lay-header-event', {
            //左侧菜单事件
            menuLeft: function (othis) {
                layer.msg('展开左侧菜单的操作', {icon: 0});
            }
            , menuRight: function () {
                layer.open({
                    type: 1
                    , content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
                    , area: ['260px', '100%']
                    , offset: 'rt' //右上角
                    , anim: 5
                    , shadeClose: true
                });
            }
        });
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            var rs;
            laydate.render({
                elem: '#test-startDate-1',
                done:function (value,date) {
                    rs = value;
                    let test = document.getElementsByName("endDate");
                    if(value === ""){
                        test[0].disabled = true;
                        test[0].value = "";
                    }else{
                        test[0].disabled = false;
                    }
                    test[0].value = "";
                    end.config.min = {
                        date: date.date,
                        year: date.year,
                        month: date.month - 1, //关键
                    };
                    end.config.max = {
                        date: date.date,
                        year: date.year,
                        month: date.month, //关键
                    };

                }
            });
            var end = laydate.render({
                elem: '#test-endDate-1',
                done:function (value) {
                    dataRange(rs,value);
                }
            });
        })

    });
</script>
</body>
</html>
